package cn.hxzy.student.service.impl;

import cn.hxzy.common.domain.ClassTable;
import cn.hxzy.common.domain.UserClass;
import cn.hxzy.course.mapper.UserClassMapper;
import cn.hxzy.student.mapper.ClassTableMapper;
import cn.hxzy.student.service.ClassTableService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class ClassTableServiceImpl extends ServiceImpl<ClassTableMapper, ClassTable> implements ClassTableService {


    @Autowired
    private UserClassMapper userClassMapper;
    @Override
    public int amendclass(Map map) {
       Integer classId = (Integer) map.get("classId");
       Integer userId =  (Integer) map.get("userId");
        return userClassMapper.updateClassIdByUserId(userId,classId);
    }
}
